<?php
require('config.php');
require('libraries/functions.php');
require('system/model.php');

if (isset($_GET['r'])) $route = $_GET['r'];
else $route = 'home/index';

$file = "backend/controllers/{$route}.php";

if (file_exists($file)) {
    require($file);
} else {
    die('Error 404');
}
